<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.sql.*"%>
<%@ page import="java.util.*"%>
<%@ page import="com.wonders.ips.common.*"%>
<%@ page import="com.wonders.ips.sysadmin.*"%>
<%@ page import="com.wonders.ips.xml.*"%>
<%
String[] dbname1 = request.getParameterValues("dbname");
String[] type = request.getParameterValues("oType");
String db_value = "";
String _content = "<xml id=zjhyxml><hyxx>";

for(int i=0;i<dbname1.length;i++) {
  if (type[i].equalsIgnoreCase("checkbox")) {
    String[] _temp = request.getParameterValues(dbname1[i]);
    _content += "<"+ dbname1[i] +">";
    if (_temp != null) {
      for (int j=0;j<_temp.length;j++) {
        if (j==0)
          _content += _temp[j];
        else
          _content += "," + _temp[j];
      }
    }
    _content += "</"+ dbname1[i] +">";
  }
  else if (type[i].equalsIgnoreCase("htmleditor")) {
	  _content += "<"+ dbname1[i] +">" + "<![CDATA[" + request.getParameter("content") + "]]>" + "</"+ dbname1[i] +">";
  }
  else {
    if (request.getParameter(dbname1[i]) != null)
	    _content += "<"+ dbname1[i] +">" + request.getParameter(dbname1[i]) + "</"+ dbname1[i] +">";
    else
      _content += "<"+ dbname1[i] +"></"+ dbname1[i] +">";
  }
}

_content += "</hyxx></xml>";


String file = request.getParameter("file");
int id = Integer.parseInt(request.getParameter("id"));
String _title = request.getParameter("title");
String _keywords = request.getParameter("keywords");
String _source = request.getParameter("source");
String _create_time = request.getParameter("create_time");
String _tflag = request.getParameter("title_flag");
String _cflag = request.getParameter("create_time_flag");
String _sflag = request.getParameter("source_flag");
int SJ_id = Integer.parseInt(request.getParameter("SJ_id"));

Subject oSub = new Subject(SJ_id);
int TP_id = oSub.TP_id;

Publish p = new Publish();
String p_content =  p.previewInfoPage(id,_title,_content,_keywords,_source,_create_time,_tflag,_cflag,_sflag,TP_id);

out.print(p_content);
%>